<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of Login
 *
 * @author jmj J.Jesus Abarca Gonzalez
 */
class LoginForm extends sfForm{

    public function configure() {
        $widgets = array(
            'email'=> new sfWidgetFormInput(),
            'password'=> new sfWidgetFormInputPassword()
        );
        $this->setWidgets($widgets);
        $this->widgetSchema->setNameFormat('singIn[%s]');
        $required = sfConfig::get('app_required_msg');
        $invalid = sfConfig::get('app_invalid_msg');

        $this->validatorSchema['email'] = new sfValidatorAnd(array(new sfValidatorString, new sfValidatorEmail()),
                array(), array('invalid'=>$invalid,'required'=>$required));
        $this->validatorSchema['password'] = new sfValidatorString(array(), array('invalid'=>$invalid,'required'=>$required));
    }


}
?>
